#ifndef BLOCKWISE_EDGE_ROW_HPP
#define BLOCKWISE_EDGE_ROW_HPP

#include "bi_location.hpp"

namespace hms::swe
{

template<BlockLocation loc>
class Block;

template<ReconstructionType _recType, EdgeRange _orien>
struct EdgeRow {
	static constexpr ReconstructionType recType { _recType };
	static constexpr EdgeRange orien { _orien };
	Index i;
	Index edgeBeg;
	Index nEdges;
};

template<ReconstructionType recType, EdgeRange orien, BlockLocation loc>
auto edgeRow(const Block<loc>& block, Index row, Index edgeBeg)
	-> EdgeRow<recType, orien>
{
	return {
		row,
		edgeBeg,
		block.template nEdgesForMap<recType, orien>()
	};
}


} // namespace hms::swe

#endif